package com.kfc.platform.user.dao.impl;

import java.util.List;

import com.kfc.platform.framework.jpa.BaseDaoImpl;
import com.kfc.platform.user.dao.StudentDao;
import com.kfc.platform.user.dao.TeacherDao;
import com.kfc.platform.user.dao.UserDao;
import com.kfc.platform.user.domain.Student;
import com.kfc.platform.user.domain.Teacher;
import com.kfc.platform.user.domain.User;

public class StudentDaoImpl extends BaseDaoImpl<Student> implements StudentDao {

	@Override
	public List<Student> findByName(String name) {
		// TODO Auto-generated method stub
		return getSession().createQuery("from Student s where s.name='"+name+"'").list();
	}

	@Override
	public List<Object[]> findSthById(int id) {
		// TODO Auto-generated method stub
		return getSession().createQuery("select s.name,s.classnum from Student s where s.id="+id).list();
	}
}
